bcaabc6209d9e1b494e4b36834911f02a90e7392,plugins/org.eclipse.xtext.ui.core/src/org/eclipse/xtext/ui/core/editor/DefaultXtextResourceChecker.java,DefaultXtextResourceChecker,check,#Resource#Map#IProgressMonitor#,50

Before Change


			// Syntactical errors
			// Collect EMF Resource Diagnostics
			for (int i = 0; i < resource.getErrors().size(); i++) {
				markers.add(markerFromXtextResourceDiagnostic(resource.getErrors().get(i), IMarker.SEVERITY_ERROR));
			}

			if (monitor.isCanceled())
				return null;

			for (int i = 0; i < resource.getWarnings().size(); i++) {
				markers.add(markerFromXtextResourceDiagnostic(resource.getWarnings().get(i), IMarker.SEVERITY_WARNING));
			}

			if (monitor.isCanceled())
				return null;

			boolean syntaxDiagFail = !markers.isEmpty();
			logCheckStatus(resource, syntaxDiagFail, "Syntax");

			for (EObject ele : resource.getContents()) {
				try {
					Map<Object, Object> options = Maps.newHashMap(context);
					options.put(CancellableDiagnostician.CANCEL_INDICATOR, new CancelIndicator() {
						public boolean isCancelled() {
							return monitor.isCanceled();
						}
					});
					Diagnostic diagnostic = diagnostician.validate(ele, options);
					if (monitor.isCanceled())
						return null;
					if (!diagnostic.getChildren().isEmpty()) {
						for (Diagnostic childDiagnostic : diagnostic.getChildren()) {
							Map<String, Object> marker = markerFromEValidatorDiagnostic(childDiagnostic);
							if (marker != null) {
								markers.add(marker);
							}
						}
					}

After Change


			// Syntactical and linking errors
			// Collect EMF Resource Diagnostics
			for (int i = 0; i < resource.getErrors().size(); i++) {
				markerFromXtextResourceDiagnostic(resource.getErrors().get(i), IMarker.SEVERITY_ERROR, acceptor);
			}

			if (monitor.isCanceled())
				return null;

			for (int i = 0; i < resource.getWarnings().size(); i++) {
				markerFromXtextResourceDiagnostic(resource.getWarnings().get(i), IMarker.SEVERITY_WARNING, acceptor);
			}

			if (monitor.isCanceled())
				return null;

			boolean syntaxDiagFail = !markers.isEmpty();
			logCheckStatus(resource, syntaxDiagFail, "Syntax");

			// Validation errors
			// Collect Validator Diagnostics
			for (EObject ele : resource.getContents()) {
				try {
					Map<Object, Object> options = Maps.newHashMap(context);
					options.put(CancellableDiagnostician.CANCEL_INDICATOR, new CancelIndicator() {
						public boolean isCancelled() {
							return monitor.isCanceled();
						}
					});
					Diagnostic diagnostic = diagnostician.validate(ele, options);
					if (monitor.isCanceled())
						return null;
					if (!diagnostic.getChildren().isEmpty()) {
						for (Diagnostic childDiagnostic : diagnostic.getChildren()) {
							markerFromEValidatorDiagnostic(childDiagnostic, acceptor);
						}
					}
					else {